package com.aruio.controller;

import com.arui.Result;
import lombok.RequiredArgsConstructor;
import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @className: ResourceAdminController
 * @author: LXHYouth
 * @date: 2024/11/16 星期六 12:12
 * @Version: 1.0
 * @description:
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/resourceMetric")
public class ResourceMetricController {
	private final SimpMessagingTemplate simpMessagingTemplate;

	/**
	 * 智能标注任务图像标注 详情
	 */
	@PostMapping("/boardCast")
	public Result<Boolean> boardCastMsg(@RequestParam String message) {
		simpMessagingTemplate.convertAndSend("resource/boardCast", message);
		return Result.status(true);
	}
}
